import request from '@/utils/request'

// 查询出库信息列表
export function listWmsOutbound(query) {
  return request({
    url: '/system/wmsOutbound/list',
    method: 'get',
    params: query
  })
}

// 查询出库信息详细
export function getWmsOutbound(id) {
  return request({
    url: '/system/wmsOutbound/' + id,
    method: 'get'
  })
}

// 新增出库信息
export function addWmsOutbound(data) {
  return request({
    url: '/system/wmsOutbound',
    method: 'post',
    data: data
  })
}

// 修改出库信息
export function updateWmsOutbound(data) {
  return request({
    url: '/system/wmsOutbound',
    method: 'put',
    data: data
  })
}

// 删除出库信息
export function delWmsOutbound(id) {
  return request({
    url: '/system/wmsOutbound/' + id,
    method: 'delete'
  })
}

// 查询出库单编号
export function getOutboundOrderNo() {
  return request({
    url: '/system/wmsOutbound/getOutboundOrderNo',
    method: 'get'
  })
}

// 取消出库单编号
export function clearOrderNo() {
  return request({
    url: '/system/wmsOutbound/clearOrderNo',
    method: 'get'
  })
}


export function getInboundProducts(query) {
  return request({
    url: '/system/wmsOutbound/getInboundProducts',
    method: 'get',
    params: query
  })
}

export function getInboundProductsByWmsInventoryCheckEdit(query) {
  return request({
    url: '/system/wmsOutbound/getInboundProductsByWmsInventoryCheckEdit',
    method: 'post',
    data: query
  })
}

export function getInboundProductsByPage(query) {
  return request({
    url: '/system/wmsOutbound/getInboundProductsByPage',
    method: 'get',
    params: query
  })
}

export function getInboundProductsByWmsInventoryCheckAdd(query) {
  return request({
    url: '/system/wmsOutbound/getInboundProductsByWmsInventoryCheckAdd',
    method: 'get',
    params: query
  })
}

export function cancellation(query){
  return request({
    url: '/system/wmsOutbound/cancellation?id='+query,
    method: 'put',
  })
}
